package com.aster.service.manage.dto.do2dto;

import com.aster.service.manage.domain.TbEscortEnterpriseInfo;
import com.aster.service.manage.dto.DtoEscortEnterpriseInfo;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@org.mapstruct.Mapper
public interface EscortEnterpriseInfoConvert {
    EscortEnterpriseInfoConvert MAPPER = Mappers.getMapper(EscortEnterpriseInfoConvert.class);

    public DtoEscortEnterpriseInfo do2dto(TbEscortEnterpriseInfo tbEscortEnterpriseInfo);

    public List<DtoEscortEnterpriseInfo> dos2dtos(List<TbEscortEnterpriseInfo> list);

    public TbEscortEnterpriseInfo dto2do(DtoEscortEnterpriseInfo dtoEscortEnterpriseInfo);

    @Mapping(target="name",ignore=true)
    @Mapping(target="synopsis",ignore=true)
    @Mapping(target="personLiable",ignore=true)
    @Mapping(target="personLiableId",ignore=true)
    @Mapping(target="tel",ignore=true)
    @Mapping(target="address",ignore=true)
    @Mapping(target="longitude",ignore=true)
    @Mapping(target="latitude",ignore=true)
    @Mapping(target="state",ignore=true)
    public TbEscortEnterpriseInfo updateDeleted(DtoEscortEnterpriseInfo dtoEscortEnterpriseInfo);

    @Mapping(target="name",ignore=true)
    @Mapping(target="synopsis",ignore=true)
    @Mapping(target="personLiable",ignore=true)
    @Mapping(target="personLiableId",ignore=true)
    @Mapping(target="tel",ignore=true)
    @Mapping(target="address",ignore=true)
    @Mapping(target="longitude",ignore=true)
    @Mapping(target="latitude",ignore=true)
    @Mapping(target="deleted",ignore=true)
    public TbEscortEnterpriseInfo updateState(DtoEscortEnterpriseInfo dtoEscortEnterpriseInfo);

    @Mapping(target="state",ignore=true)
    @Mapping(target="deleted",ignore=true)
    public TbEscortEnterpriseInfo addData(DtoEscortEnterpriseInfo dtoEscortEnterpriseInfo);
}
